#pragma once

#include <string>
#include <functional>
#include <iostream>

// using task_t = std::function<void()>;

// void Download()
// {
//     std::cout << "Download task..." << std::endl;
// }

class Task
{
public:
    Task(){}
    Task(int x, int y) : _x(x), _y(y) {}

    // 仿函数
    void operator()()
    {
        _result = _x + _y;
    }

    std::string PrintTask()
    {
        std::string msg = std::to_string(_x) + "+" + std::to_string(_y) + "=?";
        return msg;
    }

    std::string PrintRet()
    {
        std::string msg = std::to_string(_x) + "+" + std::to_string(_y) + "=" + std::to_string(_result);
        return msg;
    }
private:
    int _x;
    int _y;
    int _result;
};